package com.gavin.model;


public class Models {

	private Model[] modelsValue;
	private DataType nType;

	public void setType(DataType nType) {
		this.nType = nType;
	}

	public void setValue(Model[] modelsValue) {
		if (modelsValue == null) {
			modelsValue = new Model[0];
		}
		for (int i = 0; i < modelsValue.length; i++) {
			if (modelsValue[i] == null) {
				modelsValue[i] = new Model();
			}
		}
		this.modelsValue = modelsValue;
	}

	public Model[] getValue() {
		return this.modelsValue;
	}

	public Model getValueAt(int nIndex) {
		return modelsValue[nIndex];
	}

	public void setValueAt(int nIndex, Model modelValue) {
		if (modelValue == null) {
			modelValue = new Model();
		}
		modelsValue[nIndex] = modelValue;
	}

	public int getLength() {
		return modelsValue.length;
	}

	public Object getObjectValue() {
		return modelsValue;
	}

	public Object getObjectValueAt(int nIndex) {
		return modelsValue[nIndex];
	}

	public Models(String strFieldName) {
		setType(DataType._ms);
		this.modelsValue = new Model[0];
	}

}
